//
//  XMMemberCollectionViewCell.m
//  XunMi
//
//  Created by MacBook on 2024/2/29.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMMemberCollectionViewCell.h"
#import "XMMemberModel.h"

@interface XMMemberCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIView *bgV;
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
@property (weak, nonatomic) IBOutlet UILabel *firstLa;
@property (weak, nonatomic) IBOutlet UILabel *priceLa;
@property (weak, nonatomic) IBOutlet UILabel *tehuiLa;
@property (weak, nonatomic) IBOutlet UILabel *titleLa;


@end

@implementation XMMemberCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    kCornerRadius(_tehuiLa, 4, 0, UIColor.clearColor);
    kCornerRadius(_bgV, 10, 0, UIColor.clearColor);
    kCornerRadius(_bgImgV, 10, 1, kHEX(@"#FDCE88"));
}

- (void)setModel:(XMMemberModel *)model {
    _model = model;
    self.titleLa.text = model.title;
    self.firstLa.text = kStringFormat(@"¥%@", model.money);
    self.priceLa.attributedText = [kStringFormat(@"¥%@", model.market).mutableCopy xm_addTextCenterLineWithLineColor:kHEX(@"959595")];
    self.bgImgV.hidden = !model.selected;
    self.tehuiLa.hidden = model.quota_number.intValue == 0;
}

@end
